/*
 * @(#)CheckUserExistServlet.java	2013-2-1 下午1:34:56
 * order-jsp-servlet
 * Copyright 2013 Thuisoft, Inc. All rights reserved.
 * THUNISOFT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.thunisoft.order.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.thunisoft.order.service.IUserService;

/**
 * CheckUserExistServlet
 * 
 * @author ice
 * @version 1.0
 * 
 */
public class CheckUserExistServlet extends HttpServlet {
    /**
     * 序列版本ID
     */
    private static final long serialVersionUID = 8015473598546105787L;

    /**
     * 用户Service
     */
    @Autowired
    private IUserService userService;

    @Override
    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        String sUsername = request.getParameter("username");
        System.out.println(userService.checkUserExist(sUsername));
        
    }
}
